package com.hj.exception;

import com.hj.exception.em.ParamsExceptionEm;

/**
 * @Description 异常封装类
 * @author hj
 */
public class ParamsException extends RuntimeException {

    private int code;
    private String msg;

    public ParamsException(ParamsExceptionEm exception) {
        super(exception.getMsg());
        this.code = exception.getCode();
        this.msg = exception.getMsg();
    }

    public ParamsException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
